<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="zh">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.11.0"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>cppMISC: include/streamStatus.hpp 源文件</title>
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../jquery.js"></script>
<script type="text/javascript" src="../../dynsections.js"></script>
<script type="text/javascript" src="../../clipboard.js"></script>
<link href="../../navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../resize.js"></script>
<script type="text/javascript" src="../../cookie.js"></script>
<link href="../../search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../search/searchdata.js"></script>
<script type="text/javascript" src="../../search/search.js"></script>
<script type="text/javascript" src="../../darkmode_toggle.js"></script>
<link href="../../doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr id="projectrow">
  <td id="projectalign">
   <div id="projectname">cppMISC<span id="projectnumber">&#160;v1.1</span>
   </div>
   <div id="projectbrief">cppMisc 文档系统</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.11.0 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "../../search/",'.html');
/* @license-end */
</script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() { codefold.init(1); });
/* @license-end */
</script>
<script type="text/javascript" src="../../menudata.js"></script>
<script type="text/javascript" src="../../menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
  initMenu('../../',true,false,'search.php','搜索',false);
  $(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function(){ initResizable(false); });
/* @license-end */
</script>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">载入中...</div>
<div class="SRStatus" id="Searching">搜索中...</div>
<div class="SRStatus" id="NoMatches">未找到</div>
</div>
</div>
</div>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="../../dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li>  </ul>
</div>
</div><!-- top -->
<div id="doc-content">
<div class="header">
  <div class="headertitle"><div class="title">streamStatus.hpp</div></div>
</div><!--header-->
<div class="contents">
<a href="../../d8/dce/stream_status_8hpp.html">浏览该文件的文档.</a><div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno">    1</span> </div>
<div class="line"><a id="l00009" name="l00009"></a><span class="lineno">    9</span><span class="preprocessor">#pragma once</span></div>
<div class="line"><a id="l00010" name="l00010"></a><span class="lineno">   10</span> </div>
<div class="line"><a id="l00011" name="l00011"></a><span class="lineno">   11</span><span class="preprocessor">#include &lt;streambuf&gt;</span></div>
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno">   12</span><span class="preprocessor">#include &lt;sstream&gt;</span></div>
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno">   13</span><span class="preprocessor">#include &lt;fstream&gt;</span></div>
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno">   14</span><span class="preprocessor">#include &lt;memory&gt;</span></div>
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno">   15</span><span class="preprocessor">#include &lt;unordered_map&gt;</span></div>
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno">   16</span> </div>
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno">   17</span><span class="preprocessor">#include &lt;QStatusBar&gt;</span></div>
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno">   18</span><span class="preprocessor">#include &lt;QLabel&gt;</span></div>
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno">   19</span><span class="preprocessor">#include &lt;QColor&gt;</span></div>
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno">   20</span><span class="preprocessor">#include &lt;QMouseEvent&gt;</span></div>
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno">   21</span><span class="preprocessor">#include &lt;QDialog&gt;</span></div>
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno">   22</span> </div>
<div class="foldopen" id="foldopen00023" data-start="{" data-end="};">
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno"><a class="line" href="../../d2/dc7/structss_status_plug_base.html">   23</a></span><span class="keyword">struct </span><a class="code hl_struct" href="../../d2/dc7/structss_status_plug_base.html">ssStatusPlugBase</a></div>
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno">   24</span>{</div>
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno"><a class="line" href="../../d2/dc7/structss_status_plug_base.html#a0f9f4f1795e8b987b3eccf0b4582e849">   25</a></span>    <span class="keyword">virtual</span> <a class="code hl_function" href="../../d2/dc7/structss_status_plug_base.html#a0f9f4f1795e8b987b3eccf0b4582e849">~ssStatusPlugBase</a>(){}</div>
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"><a class="line" href="../../d2/dc7/structss_status_plug_base.html#ad99dfc8a122de87e3aaf047baba1372c">   30</a></span>    <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code hl_function" href="../../d2/dc7/structss_status_plug_base.html#ad99dfc8a122de87e3aaf047baba1372c">push</a>( <span class="keyword">const</span> std::string&amp; data ) = 0;</div>
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno"><a class="line" href="../../d2/dc7/structss_status_plug_base.html#ab1aaf78f67c6012afe6fb955aa09ab64">   35</a></span>    <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code hl_function" href="../../d2/dc7/structss_status_plug_base.html#ab1aaf78f67c6012afe6fb955aa09ab64">run</a>() = 0;</div>
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno">   36</span>};</div>
</div>
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno">   37</span> </div>
<div class="foldopen" id="foldopen00038" data-start="{" data-end="};">
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno"><a class="line" href="../../df/d42/classss_status_bar.html">   38</a></span><span class="keyword">class </span><a class="code hl_class" href="../../df/d42/classss_status_bar.html">ssStatusBar</a> : <span class="keyword">public</span> QStatusBar , <span class="keyword">public</span> std::basic_streambuf&lt; char &gt;</div>
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno">   39</span>{</div>
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno">   40</span><span class="keyword">public</span>:</div>
<div class="foldopen" id="foldopen00041" data-start="{" data-end="};">
<div class="line"><a id="l00041" name="l00041"></a><span class="lineno"><a class="line" href="../../df/d42/classss_status_bar.html#a95ad1ef381dc84ff086eb5c5d6d03ead">   41</a></span>    <span class="keyword">enum</span> <a class="code hl_enumeration" href="../../df/d42/classss_status_bar.html#a95ad1ef381dc84ff086eb5c5d6d03ead">emErrCode</a>{</div>
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno"><a class="line" href="../../df/d42/classss_status_bar.html#a95ad1ef381dc84ff086eb5c5d6d03eada314362ae98cca507769c579883ba5583">   42</a></span>        <a class="code hl_enumvalue" href="../../df/d42/classss_status_bar.html#a95ad1ef381dc84ff086eb5c5d6d03eada314362ae98cca507769c579883ba5583">ERR_CREATE_LOG</a> = -1000,</div>
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno">   43</span>        <a class="code hl_enumvalue" href="../../df/d42/classss_status_bar.html#a95ad1ef381dc84ff086eb5c5d6d03eada0e0e2de62333157a93f8393218cf0412">OK</a> = 0</div>
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno"><a class="line" href="../../df/d42/classss_status_bar.html#a95ad1ef381dc84ff086eb5c5d6d03eada0e0e2de62333157a93f8393218cf0412">   44</a></span>    };</div>
</div>
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno">   45</span> </div>
<div class="line"><a id="l00046" name="l00046"></a><span class="lineno"><a class="line" href="../../df/d42/classss_status_bar.html#a29fe495b5f07d3a456f4634f1bc1b5f1">   46</a></span>    <span class="keyword">using </span><a class="code hl_typedef" href="../../df/d42/classss_status_bar.html#a29fe495b5f07d3a456f4634f1bc1b5f1">ssStatusDcrt_t</a> = std::unordered_map&lt; std::string , std::unique_ptr&lt; ssStatusPlugBase &gt; &gt;;</div>
<div class="line"><a id="l00047" name="l00047"></a><span class="lineno"><a class="line" href="../../df/d42/classss_status_bar.html#aba88da0b55c0c3559a176193e4d8cf1d">   47</a></span>    <span class="keyword">using </span><a class="code hl_struct" href="../../d2/dc7/structss_status_plug_base.html">dcrt_t</a> = <a class="code hl_struct" href="../../d2/dc7/structss_status_plug_base.html">ssStatusPlugBase</a>;</div>
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno">   48</span><span class="keyword">private</span>:</div>
<div class="line"><a id="l00049" name="l00049"></a><span class="lineno">   49</span>    std::string             __m_data;</div>
<div class="line"><a id="l00050" name="l00050"></a><span class="lineno">   50</span>    QLabel                    * __p_status;</div>
<div class="line"><a id="l00051" name="l00051"></a><span class="lineno">   51</span>    <span class="keywordtype">bool</span>                    __m_en_log;</div>
<div class="line"><a id="l00052" name="l00052"></a><span class="lineno">   52</span>    <span class="keywordtype">int</span>                 __m_log_type;</div>
<div class="line"><a id="l00053" name="l00053"></a><span class="lineno">   53</span> </div>
<div class="line"><a id="l00054" name="l00054"></a><span class="lineno">   54</span>    std::shared_ptr&lt; std::ofstream &gt;    __pt_os;</div>
<div class="line"><a id="l00057" name="l00057"></a><span class="lineno">   57</span>    <a class="code hl_typedef" href="../../df/d42/classss_status_bar.html#a29fe495b5f07d3a456f4634f1bc1b5f1">ssStatusDcrt_t</a>              __m_dcrts;</div>
<div class="line"><a id="l00058" name="l00058"></a><span class="lineno">   58</span><span class="keyword">protected</span>:</div>
<div class="line"><a id="l00059" name="l00059"></a><span class="lineno">   59</span>    <span class="keyword">virtual</span> <span class="keywordtype">int</span> <a class="code hl_function" href="../../df/d42/classss_status_bar.html#a42f2b466c0af7f2864c7080db0e12680">overflow</a>( <span class="keywordtype">int</span> c ) <span class="keyword">final</span>;</div>
<div class="line"><a id="l00060" name="l00060"></a><span class="lineno">   60</span><span class="keyword">private</span>:</div>
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno">   65</span>    <span class="keyword">virtual</span> <span class="keywordtype">void</span> mouseDoubleClickEvent(QMouseEvent *event) <span class="keyword">override</span>;</div>
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno">   66</span> </div>
<div class="line"><a id="l00067" name="l00067"></a><span class="lineno">   67</span><span class="keyword">public</span>:</div>
<div class="line"><a id="l00068" name="l00068"></a><span class="lineno">   68</span>    <a class="code hl_function" href="../../df/d42/classss_status_bar.html#ac405576ec6f94574fc90add9f889e9ba">ssStatusBar</a>( QWidget * parent );</div>
<div class="line"><a id="l00069" name="l00069"></a><span class="lineno"><a class="line" href="../../df/d42/classss_status_bar.html#a6abb772e84a7d8828cdcc7e1db9a482e">   69</a></span>    <span class="keyword">virtual</span> <a class="code hl_function" href="../../df/d42/classss_status_bar.html#a6abb772e84a7d8828cdcc7e1db9a482e">~ssStatusBar</a>(){}</div>
<div class="line"><a id="l00075" name="l00075"></a><span class="lineno">   75</span>    <span class="keywordtype">void</span> <a class="code hl_function" href="../../df/d42/classss_status_bar.html#ace102381afcaa6cbb1c0df4385b83d31">setLabelColor</a>( <span class="keyword">const</span> std::string&amp; color , <span class="keyword">const</span> std::string&amp; txt = <span class="stringliteral">&quot;   &quot;</span>);</div>
<div class="line"><a id="l00082" name="l00082"></a><span class="lineno">   82</span>    <span class="keywordtype">bool</span> <a class="code hl_function" href="../../df/d42/classss_status_bar.html#aa2e197606d6b3dbf441bd66754e8a830">dcrtIt</a>( <span class="keyword">const</span> std::string&amp; <span class="keywordtype">id</span> , <a class="code hl_typedef" href="../../df/d42/classss_status_bar.html#aba88da0b55c0c3559a176193e4d8cf1d">dcrt_t</a> * dcrt );</div>
<div class="line"><a id="l00087" name="l00087"></a><span class="lineno">   87</span>    <span class="keywordtype">void</span> <a class="code hl_function" href="../../df/d42/classss_status_bar.html#a7785bb703f42b855ac8b14c6129fa3b4">unDcrtIt</a>( <span class="keyword">const</span> std::string&amp; <span class="keywordtype">id</span> );</div>
<div class="line"><a id="l00088" name="l00088"></a><span class="lineno">   88</span>};</div>
</div>
<div class="ttc" id="aclassss_status_bar_html"><div class="ttname"><a href="../../df/d42/classss_status_bar.html">ssStatusBar</a></div><div class="ttdef"><b>定义</b> <a href="#l00038">streamStatus.hpp:39</a></div></div>
<div class="ttc" id="aclassss_status_bar_html_a29fe495b5f07d3a456f4634f1bc1b5f1"><div class="ttname"><a href="../../df/d42/classss_status_bar.html#a29fe495b5f07d3a456f4634f1bc1b5f1">ssStatusBar::ssStatusDcrt_t</a></div><div class="ttdeci">std::unordered_map&lt; std::string, std::unique_ptr&lt; ssStatusPlugBase &gt; &gt; ssStatusDcrt_t</div><div class="ttdef"><b>定义</b> <a href="#l00046">streamStatus.hpp:46</a></div></div>
<div class="ttc" id="aclassss_status_bar_html_a42f2b466c0af7f2864c7080db0e12680"><div class="ttname"><a href="../../df/d42/classss_status_bar.html#a42f2b466c0af7f2864c7080db0e12680">ssStatusBar::overflow</a></div><div class="ttdeci">virtual int overflow(int c) final</div><div class="ttdef"><b>定义</b> <a href="../../d7/d17/stream_status_8cpp_source.html#l00059">streamStatus.cpp:59</a></div></div>
<div class="ttc" id="aclassss_status_bar_html_a6abb772e84a7d8828cdcc7e1db9a482e"><div class="ttname"><a href="../../df/d42/classss_status_bar.html#a6abb772e84a7d8828cdcc7e1db9a482e">ssStatusBar::~ssStatusBar</a></div><div class="ttdeci">virtual ~ssStatusBar()</div><div class="ttdef"><b>定义</b> <a href="#l00069">streamStatus.hpp:69</a></div></div>
<div class="ttc" id="aclassss_status_bar_html_a7785bb703f42b855ac8b14c6129fa3b4"><div class="ttname"><a href="../../df/d42/classss_status_bar.html#a7785bb703f42b855ac8b14c6129fa3b4">ssStatusBar::unDcrtIt</a></div><div class="ttdeci">void unDcrtIt(const std::string &amp;id)</div><div class="ttdoc">移除装饰</div><div class="ttdef"><b>定义</b> <a href="../../d7/d17/stream_status_8cpp_source.html#l00106">streamStatus.cpp:106</a></div></div>
<div class="ttc" id="aclassss_status_bar_html_a95ad1ef381dc84ff086eb5c5d6d03ead"><div class="ttname"><a href="../../df/d42/classss_status_bar.html#a95ad1ef381dc84ff086eb5c5d6d03ead">ssStatusBar::emErrCode</a></div><div class="ttdeci">emErrCode</div><div class="ttdef"><b>定义</b> <a href="#l00041">streamStatus.hpp:41</a></div></div>
<div class="ttc" id="aclassss_status_bar_html_a95ad1ef381dc84ff086eb5c5d6d03eada0e0e2de62333157a93f8393218cf0412"><div class="ttname"><a href="../../df/d42/classss_status_bar.html#a95ad1ef381dc84ff086eb5c5d6d03eada0e0e2de62333157a93f8393218cf0412">ssStatusBar::OK</a></div><div class="ttdeci">@ OK</div><div class="ttdef"><b>定义</b> <a href="#l00044">streamStatus.hpp:43</a></div></div>
<div class="ttc" id="aclassss_status_bar_html_a95ad1ef381dc84ff086eb5c5d6d03eada314362ae98cca507769c579883ba5583"><div class="ttname"><a href="../../df/d42/classss_status_bar.html#a95ad1ef381dc84ff086eb5c5d6d03eada314362ae98cca507769c579883ba5583">ssStatusBar::ERR_CREATE_LOG</a></div><div class="ttdeci">@ ERR_CREATE_LOG</div><div class="ttdef"><b>定义</b> <a href="#l00042">streamStatus.hpp:42</a></div></div>
<div class="ttc" id="aclassss_status_bar_html_aa2e197606d6b3dbf441bd66754e8a830"><div class="ttname"><a href="../../df/d42/classss_status_bar.html#aa2e197606d6b3dbf441bd66754e8a830">ssStatusBar::dcrtIt</a></div><div class="ttdeci">bool dcrtIt(const std::string &amp;id, dcrt_t *dcrt)</div><div class="ttdoc">添加装饰</div><div class="ttdef"><b>定义</b> <a href="../../d7/d17/stream_status_8cpp_source.html#l00089">streamStatus.cpp:89</a></div></div>
<div class="ttc" id="aclassss_status_bar_html_aba88da0b55c0c3559a176193e4d8cf1d"><div class="ttname"><a href="../../df/d42/classss_status_bar.html#aba88da0b55c0c3559a176193e4d8cf1d">ssStatusBar::dcrt_t</a></div><div class="ttdeci">ssStatusPlugBase dcrt_t</div><div class="ttdef"><b>定义</b> <a href="#l00047">streamStatus.hpp:47</a></div></div>
<div class="ttc" id="aclassss_status_bar_html_ac405576ec6f94574fc90add9f889e9ba"><div class="ttname"><a href="../../df/d42/classss_status_bar.html#ac405576ec6f94574fc90add9f889e9ba">ssStatusBar::ssStatusBar</a></div><div class="ttdeci">ssStatusBar(QWidget *parent)</div><div class="ttdef"><b>定义</b> <a href="../../d7/d17/stream_status_8cpp_source.html#l00008">streamStatus.cpp:8</a></div></div>
<div class="ttc" id="aclassss_status_bar_html_ace102381afcaa6cbb1c0df4385b83d31"><div class="ttname"><a href="../../df/d42/classss_status_bar.html#ace102381afcaa6cbb1c0df4385b83d31">ssStatusBar::setLabelColor</a></div><div class="ttdeci">void setLabelColor(const std::string &amp;color, const std::string &amp;txt=&quot;   &quot;)</div><div class="ttdoc">状态栏红绿灯设置</div><div class="ttdef"><b>定义</b> <a href="../../d7/d17/stream_status_8cpp_source.html#l00081">streamStatus.cpp:81</a></div></div>
<div class="ttc" id="astructss_status_plug_base_html"><div class="ttname"><a href="../../d2/dc7/structss_status_plug_base.html">ssStatusPlugBase</a></div><div class="ttdoc">自定义一个流缓冲区，用来在方便在状态栏显示相关信息</div><div class="ttdef"><b>定义</b> <a href="#l00023">streamStatus.hpp:24</a></div></div>
<div class="ttc" id="astructss_status_plug_base_html_a0f9f4f1795e8b987b3eccf0b4582e849"><div class="ttname"><a href="../../d2/dc7/structss_status_plug_base.html#a0f9f4f1795e8b987b3eccf0b4582e849">ssStatusPlugBase::~ssStatusPlugBase</a></div><div class="ttdeci">virtual ~ssStatusPlugBase()</div><div class="ttdef"><b>定义</b> <a href="#l00025">streamStatus.hpp:25</a></div></div>
<div class="ttc" id="astructss_status_plug_base_html_ab1aaf78f67c6012afe6fb955aa09ab64"><div class="ttname"><a href="../../d2/dc7/structss_status_plug_base.html#ab1aaf78f67c6012afe6fb955aa09ab64">ssStatusPlugBase::run</a></div><div class="ttdeci">virtual void run()=0</div><div class="ttdoc">运行模块</div></div>
<div class="ttc" id="astructss_status_plug_base_html_ad99dfc8a122de87e3aaf047baba1372c"><div class="ttname"><a href="../../d2/dc7/structss_status_plug_base.html#ad99dfc8a122de87e3aaf047baba1372c">ssStatusPlugBase::push</a></div><div class="ttdeci">virtual void push(const std::string &amp;data)=0</div><div class="ttdoc">添加数据</div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
制作者&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.11.0
</small></address>
</div><!-- doc-content -->
</body>
</html>
